package com.iflytek.nacos.biz;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springCloudAlibaba
 * @description:
 * @author: 陈英俊
 * @create: 2022-01-18 10:14
 */
@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigCloudBiz {

    @Value("${useLocalCache:false}")
    private boolean useLocalCache;

    /**
     * http://localhost:8080/config/get
     */
    @RequestMapping("/get")
    public boolean get() {
        return useLocalCache;
    }
}
